﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace PMS
{
    public partial class UnitForm : Form
    {
        public UnitForm()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            PMS.Model.Unit unit = new PMS.Model.Unit();
            PMS.BLL.Unit unitbll = new PMS.BLL.Unit();
            unit.Id = 0;
            unit.UnitName = txt_name.Text;
            if (unitbll.Insert(unit))
            {
                MessageBox.Show("添加成功!");
            }
            else
            {
                MessageBox.Show("添加失败!");
            }
        }
    }
}
